<?php

class Application_Form_Registration extends Zend_Form
{

    public function init()
    {
        $firstname = new Zend_Form_Element_Text('firstname');
        $firstname->setLabel('First Name')
                  ->setRequired(false);
                    
        $lastname = new Zend_Form_Element_Text('lastname');
        $lastname->setLabel('Last Name')
                  ->setRequired(false);
                    
        $email = new Zend_Form_Element_Text('email');
        $email->setLabel('Email*')
              ->setRequired(true);
                
        $username = new Zend_Form_Element_Text('username');
        $username->setLabel('Username*')
                 ->setRequired(true);
                
        $password = new Zend_Form_Element_Password('password');
        $password->setLabel('Password*')
                 ->setRequired(true);
                
        $confirmPassword = new Zend_Form_Element_Password('confirmPassword');
        $confirmPassword->setLabel('Confirm Password*')
                        ->setRequired(true);
                
        $register = new Zend_Form_Element_Submit('register');
        $register->setLabel('Register')
                ->setIgnore(true);
                
        $this->addElements(array(
                        $firstname,
                        $lastname,
                        $email,
                        $username,
                        $password,
                        $confirmPassword,
                        $register
                        ));   
                        
       	$this->setElementDecorators(array(
        					'ViewHelper',
        					//'Errors',
        					'Label',
        					array(array('row'=>'HtmlTag'), array('tag'=>'div', 'class'=>'input'))
        ));

        
        $register->setDecorators(array('ViewHelper',
        							array(array('row'=>'HtmlTag'), array('tag'=>'div', 'class'=>'submit'))
        						));
        					
        $this->setAttrib('id', 'register-form');
		$this->setDecorators(array(
						'FormElements',
						'Form'
						));                
                        
    }


}

